<template>
	<div class="zhengtuojianhuo">
		<van-nav-bar :fixed="true" class="navBar" title="多日未配" left-arrow @click-left="$router.go(-1)"></van-nav-bar>




		<div class="goodsFromWarp">
				<div class="goodsInputWarp">
						<div class="goodsInputLabel">
							<div class="goodsInputBorder"></div>
							<div class="skuName"  style="width: 135px; font-size: 12px;">前N天未配：</div>
						</div>
						<van-field
							 type="digit"
							 class="skuInput"
							 v-model="editForm.wpday"
							 placeholder="请填写前N天未配"
							 clearable
						 />
				</div>

		</div>


		<div class="skuBtn" style="justify-content: flex-end;">
			<van-button type="info" :disabled="isdisabled" @click="lingquBtn()">查询任务</van-button>
		</div>

		<div class="carCardWarp">
			<div class="carCard" v-for="(item,index) in lingquData" :key="index">
				<van-row class="goodRow">
				  <van-col span="24"> <span>序:</span>{{item.rownum}}</van-col>
				</van-row>


				<van-row class="goodsNameWarp">
						<span class="label">商品：</span>
						<span class="value"> {{item.itemid}}-{{item.itemname}}</span>
				</van-row>



				<van-row class="goodRow" style="margin-top: 10px;">
				  <van-col span="24"> <span>部类:</span>{{item.deptcsdp}}</van-col>
				</van-row>
			</div>
		</div>
	</div>
</template>

<script>

export default {
  name: 'duoriweipei',
  data() {
    return {
			editForm:{
				wpday:'30',
			},
			isdisabled:false,
			lingquData:[],
			isLingQuVisible:false,
		};
  },
	computed: {
		 ryuser: function(){
			 return this.GWO(true).gUSER;
		 },
	},
  methods: {
		lingquBtn(){
			var _self = this;
			_self.total = 0
			var ldemodata = [{retval:0, errmsg:'返回数据集'},]
			this.MYPOST({
					'method':'dgate',
					'pname':'f_wmsa_y_chaxun',
					'i':this.FNULLE([
					'opmode','Y_DRWP_qrybill',
						'czyid',this.ryuser.operatorid,
						'kqid', this.ryuser.kqid,
						'wpday',this.editForm.wpday,
					])
				},'多日未配',true, ldemodata, function(ret_obj, ret_iserr,ret_errmess,ret_oldresp){
				if(ret_iserr){ //传入的true参数,理论上不会有此回调了
					_self.$toast.fail('查询失败')
					_self.$store.commit('hideLoading');
				}else{
					var rtn_json_obj = null;
					_self.$store.commit('hideLoading');
					if(ret_obj != null){ rtn_json_obj = ret_obj; //返回的接口可以直接解析的情况
					}else{  rtn_json_obj = _self.arr2Obj(ret_oldresp.data); //非标准的dgate接口,返回的一个不兼容的处理
					}
					console.log("得到多日未配")
					console.log(rtn_json_obj)
					_self.lingquData = rtn_json_obj
				}
			});
		},
  },
  mounted() {

  },
	components: {

	},
};
</script>

<style lang="scss" scoped>
	// 引入公共样式
	@import '@/assets/css/base.scss';
	@import '@/assets/css/input.scss';
	div.zhengtuojianhuo{
		padding-top: 50px;
	}



	div.carCardWarp{
		width: 94%;
		margin-left: 3%;
		margin-right: 3%;
		margin-top: 20px;
		font-size: 20px;
		font-weight: bold;
		div.carCard{
			position: relative;
			border-left: 5px solid #4998FF;
			box-sizing: border-box;
			padding-left: 10px;
			padding-right: 10px;
			border-radius:5px;
			background-color: #fff;
			padding-top: 10px;
			padding-bottom: 10px;
			margin-bottom:15px;
			div.status{
				position: absolute;
				right: 0;
				top: 0;
				width: 65px;
				height: 30px;
				display: flex;
				align-items: center;
				justify-content: center;
				color: #fff;
				font-size: 12px;
				border-radius: 0px 10px 0px 10px;
			}
			div.goodRow{
				margin-bottom:8px;
				span{
					display: inline-block;
					width:80px;
				}
			}
			div.goodsTitleRow{
				display: flex;
				width: 100%;
				div.goodsTitleLabel{
					width: 80px;
				}
				div.skuNoTitle{
					width: calc(100% - 80px);
				}
			}
		}
	}


	.goodsNameWarp{
		font-size: 20px;
		display: flex;
		margin-bottom:5px;
		font-weight: bold;
		display: flex;
		flex: 1;
		span{
			display: block;
		}
		.label{
			width:80px;
		}
		.value{
			line-height: 22px;
			flex: 1;
			width: 0;
		}
	}

</style>
